Database Management System


Q161.

In an inventory management system implemented at a trading corporation, there are several tables designed to hold all the information. Amongst these, the following two tables hold information on which items are supplied by which suppliers, and which warehouse keeps which items along with the stock-level of these items. Supply = (supplierid, itemcode) Inventory = (itemcode, warehouse, stocklevel) For a specific information required by the management, following SQL query has been written Select distinct STMP.supplierid From Supply as STMP Where not unique (Select ITMP.supplierid From Inventory, Supply as ITMP Where STMP.supplierid = ITMP.supplierid And ITMP.itemcode = Inventory.itemcode And Inventory.warehouse = 'Nagpur'); For the warehouse at Nagpur, this query will find all suppliers wh
GateOverflow

Q162.

Which commands are used to control access over objects in relational database?
GateOverflow

Q163.

Which of the following is aggregate function in SQL?
GateOverflow

Q164.

Database table by name Loan_Records is given below. What is the output of the following SQL query? SELECT count(*) FROM( (SELECT Borrower. Bank_Manager FROM Loan_Records) AS S NATURAL JOIN (SELECT Bank_Manager, Loan_Amount FROM Loan_Records) AS T);
GateOverflow

Q165.

Consider the following relational schema:Student(school-id,sch-roll-no,sname,saddress) School(school-id,sch-name,sch-address,sch-phone) Enrolment(school-id,sch-roll-no,erollno,examname) ExamResult(erollno,examname,marks) What does the following SQL query output?SELECT sch-name, COUNT (*) FROM School C, Enrolment E, ExamResult R WHERE E.school-id = C.school-id AND E.examname = R.examname AND E.erollno = R.erollno AND R.marks = 100 AND S.school-id IN (SELECT school-id FROM student GROUP BY school-id HAVING COUNT (*) > 200) GROUP By school-id
GateOverflow

Q166.

Which one of the following is NOT a part of the ACID properties of database transactions?
GateOverflow

Q167.

In a database system, unique time stamps are assigned to each transaction using Lamport's logical clock . Let TS(T_{1}) and TS(T_{2}) be the timestamps of transactions T_{1} and T_{2} respectively. Besides, T_{1} holds a lock on the resource R, and T_{2} has requested a conflicting lock on the same resource R. The following algorithm is used to prevent deadlocks in the database system assuming that a killed transaction is restarted with the same timestamp. Assume any transactions that is not killed terminates eventually. Which of the following is TRUE about the database system that uses the above algorithm to prevent deadlocks?
GateOverflow

Q168.

Which of the following concurrency control protocol ensures both conflict and free from deadlock? ,
GateOverflow

Q169.

Let R_i(z) and W_i(z) denote read and write operations on a data element z by a transaction T_i, respectively. Consider the schedule S with four transactions.S: R_4(x)R_2(x)R_3(x)R_1(y)W_1(y)W_2 (x)W_3 (y)R_4(y) Which one of the following serial schedules is conflict equivalent to S?
GateOverflow

Q170.

Suppose a database schedule S involves transactions T1,...,Tn. Construct the precedence graph of S with vertices representing the transactions and edges representing the conflicts. If S is serializable, which one of the following orderings of the vertices of the precedence graph is guaranteed to yield a serial schedule?
GateOverflow